using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
    [Table("bgm_project_operation_expense_rate"), DataContract]
    public class ProjectOperationExpenseRate
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "BgmProjOperExpRateId", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("bgm_proj_oper_exp_rate_seq", TypeName="int")]
        public int BgmProjOperExpRateId { get; set; }

        [ForeignKey("BgmProjOperExp")]
        [DataMember, Display(Name = "BgmProjOperExpId", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("bgm_proj_oper_exp_seq", TypeName="int")]
        public Nullable<int> BgmProjOperExpId { get; set; }

        [ForeignKey("MasExpenseRate")]
        [DataMember, Display(Name = "ExpRateId", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("exp_rate_seq", TypeName="int")]
        public Nullable<int> ExpRateId { get; set; }

        [DataMember, Display(Name = "Amount", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("amount", TypeName="decimal")]
        public Nullable<double> Amount { get; set; }

        [DataMember, Display(Name = "Man", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("man", TypeName="int")]
        public Nullable<int> Man { get; set; }

        [DataMember, Display(Name = "Day", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("day", TypeName="decimal")]
        public Nullable<double> Day { get; set; }

        [DataMember, Display(Name = "Hour", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("hour", TypeName="decimal")]
        public Nullable<double> Hour { get; set; }

        [DataMember, Display(Name = "Minute", ResourceType = typeof(Resources.ProjectOperationExpenseRateResource))]
        [Column("minute", TypeName="decimal")]
        public Nullable<double> Minute { get; set; }

        [DataMember]
        public virtual ProjectOperationExpense BgmProjOperExp { get; set; }

        [DataMember]
        public virtual FIM.MasExpenseRate MasExpenseRate { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}